﻿<%@ Page
    Language="C#"
    AutoEventWireup="true"
    CodeBehind="Login.aspx.cs"
    Inherits="ModernShopping.Account.Login"
    MasterPageFile="~/ModernShopping.Master" %>

<%@ Register Src="~/WebUserControls/UCCountDown.ascx" TagName="Countdown" TagPrefix="MyUserControls" %>
<%@ Register Src="~/WebUserControls/UCPopup.ascx" TagName="Popup" TagPrefix="MyUserControls" %>

<asp:Content ID="Header" runat="server" ContentPlaceHolderID="HeaderContent">
    <script type="text/javascript" src="../Scripts/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.validate.js"></script>
    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine" />
    <style type="text/css">
        .auto-style3 {
            text-align: center;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#form1").validate({
                rules: {
                    <%=TxtUsername.UniqueID%>: {
                        required: true,
                        minlength: 4
                    },
                    <%=TxtPassword.UniqueID%>: {
                        required: true,
                        minlength: 6
                    }
                },
                messages: {
                    <%=TxtUsername.UniqueID%>: {
                        required: "Bạn không được để trống mục này!",
                        minlength: "Tên đăng nhập phải có ít nhất từ 4 kí tự trở lên"
                    },
                    <%=TxtPassword.UniqueID%>: {
                        required: "Bạn không được để trống mục này!",
                        minlength: "Mật khẩu phải từ 6 kí tự trở lên"
                    }
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <div class="div-center">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="login">
            <div style="width: 90%; margin: 50px auto auto auto;">
                <div class="side-login">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <asp:Label ID="Label1" Text="ĐĂNG NHẬP" runat="server" CssClass="subheader" Width="100%" Font-Size="15pt"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" Text="Tên đăng nhập:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="table-input-col">
                                <asp:TextBox ID="TxtUsername" runat="server" CssClass="textbox" Style="margin-left: 15px;" Width="90%"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender
                                    ID="TxtUsername_FilteredTextBoxExtender"
                                    runat="server"
                                    Enabled="True"
                                    FilterType="Numbers, UppercaseLetters, LowercaseLetters"
                                    TargetControlID="TxtUsername" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" Text="Mật khẩu:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="table-input-col">
                                <asp:TextBox ID="TxtPassword" runat="server" CssClass="textbox" Style="margin-left: 15px;" Width="90%" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="cBGhiNhoMatKhau" runat="server" Style="margin-left: 15px;" Text="Ghi nhớ mật khẩu" TextAlign="Left" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">
                                <asp:Button ID="btnDangNhap" Style="margin-right: 40px;" runat="server" CssClass="button" Text="ĐĂNG NHẬP" OnClick="btnDangNhap_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="side-register">
                    <table style="width: 100%; margin-top: 20%;">
                        <tr>
                            <td class="auto-style3">
                                <asp:Label ID="Label5" Text="MỚI BẮT ĐẦU SỬ DỤNG?" runat="server" Font-Bold="True" Font-Size="15pt"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style3">
                                <asp:Label ID="Label6" Text="Hãy nhấn vào nút đăng kí để tạo tài khoản cho mình." runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="auto-style3">
                                <br />
                                <asp:Button ID="btnDangKy" runat="server" Text="ĐĂNG KÝ" CssClass="button" PostBackUrl="~/Account/Register.aspx" UseSubmitBehavior="False" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
<%--    <ajaxToolkit:ModalPopupExtender
        ID="ModalPopupExtender"
        runat="server"
        TargetControlID="hidden"
        PopupControlID="PanelLocationStore"
        BackgroundCssClass="modalBackground" />
    <asp:Panel
        ID="PanelLocationStore"
        runat="server"
        CssClass="modalPopup"
        align="center"
        Style="display: normal"
        Width="50%"
        Height="30%"
        HorizontalAlign="Center">
        <asp:HiddenField ID="hidden" runat="server" />
        <MyUserControls:Countdown runat="server" ID="Countdown" />
    </asp:Panel>--%>
    <MyUserControls:Countdown runat="server" ID="Countdown" />
    <MyUserControls:Popup runat="server" ID="MyPopup" />
</asp:Content>
